package com.ruoyi.boss.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.boss.mapper.TVehicleMapper;
import com.ruoyi.boss.domain.TVehicle;
import com.ruoyi.boss.service.ITVehicleService;

/**
 * 车辆列表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-18
 */
@Service
public class TVehicleServiceImpl implements ITVehicleService 
{
    @Autowired
    private TVehicleMapper tVehicleMapper;

    /**
     * 查询车辆列表
     * 
     * @param vehicleId 车辆列表主键
     * @return 车辆列表
     */
    @Override
    public TVehicle selectTVehicleByVehicleId(Long vehicleId)
    {
        return tVehicleMapper.selectTVehicleByVehicleId(vehicleId);
    }

    /**
     * 查询车辆列表列表
     * 
     * @param tVehicle 车辆列表
     * @return 车辆列表
     */
    @Override
    public List<TVehicle> selectTVehicleList(TVehicle tVehicle)
    {
        return tVehicleMapper.selectTVehicleList(tVehicle);
    }

    /**
     * 新增车辆列表
     * 
     * @param tVehicle 车辆列表
     * @return 结果
     */
    @Override
    public int insertTVehicle(TVehicle tVehicle)
    {
        tVehicle.setCreateTime(DateUtils.getNowDate());
        return tVehicleMapper.insertTVehicle(tVehicle);
    }

    /**
     * 修改车辆列表
     * 
     * @param tVehicle 车辆列表
     * @return 结果
     */
    @Override
    public int updateTVehicle(TVehicle tVehicle)
    {
        tVehicle.setUpdateTime(DateUtils.getNowDate());
        return tVehicleMapper.updateTVehicle(tVehicle);
    }

    /**
     * 批量删除车辆列表
     * 
     * @param vehicleIds 需要删除的车辆列表主键
     * @return 结果
     */
    @Override
    public int deleteTVehicleByVehicleIds(Long[] vehicleIds)
    {
        return tVehicleMapper.deleteTVehicleByVehicleIds(vehicleIds);
    }

    /**
     * 删除车辆列表信息
     * 
     * @param vehicleId 车辆列表主键
     * @return 结果
     */
    @Override
    public int deleteTVehicleByVehicleId(Long vehicleId)
    {
        return tVehicleMapper.deleteTVehicleByVehicleId(vehicleId);
    }
}
